package com.yidiandao.business.ui.main.shoppingcart.confirmorder;

import com.yidiandao.business.base.BasePresenter;
import com.yidiandao.business.base.BaseView;
import com.yidiandao.business.data.Consignee;
import com.yidiandao.business.interfaces.RefreshLayoutStateListener;

import java.util.List;

/**
 * 确认订单-契约类
 * <p>
 * <p>Created by ChenTao(chentao7v@gmail.com) on 2017/2/8 15:43
 */
public interface ConfirmOrderContract {

    interface Presenter extends BasePresenter {

        /**
         * 加载确认订单的数据
         */
        void loadConfirmOrderData();

        /**
         * 提交订单以结算
         */
        void submitOrder();

        void setNeedRefreshShoppingCart(boolean refreshShoppingCart);

        void toChooseDeliveryActivity();

    }

    interface View extends BaseView<Presenter>, RefreshLayoutStateListener {

        String getMessage();

        void setPayWayUI(String payWays, float payFee);

        void toChooseDeliveryActivity(String addressId);

        void toChooseRedPacketActivity();

        void toChooseDiscountCouponActivity();

        void toChooseAddressActivity();

        void toInventoryActivity();

        void toInvoiceActivity();

        void finishActivity();

        void showLoadingDialog();

        void hideLoadingDialog();

        void refreshConsignee(Consignee consignee);

        void refreshGoodsImages(List<String> goodsList, int totalGoodsCount);

        void toOrderResultActivity(String orderPayId);

        void refreshRedPacketUI(float redPacketReduce, int redPacketCount);

        void refreshRedPacketReduce(float money);

        void refreshInvoiceUI(String invRate, String invTitle);

        void showServicePhone(String servicePhone);

        void refreshCoupon(int couponCount, float couponMoney);

        void toCashierActivity(String url, String orderPayId, String totalOnlinePay, boolean allOnlinePay);

        void toChoosePayWayActivity();

        /**
         * 刷新统计的价格 UI
         *
         * @param goodsTotalPrice 商品金额
         * @param shippingFee     运费
         * @param invMoney        发票
         * @param payFee          手续费
         * @param submitPrice     提交的金额
         */
        void refreshTotalFeeUI(float goodsTotalPrice, float shippingFee, float invMoney, float payFee, float submitPrice);

        void toMultiPayWaysActivity(String orderPayId);
    }
}
